const common = require('./common');

module.exports = class {

    constructor() {
      this.apis = [
        {
          'method': 'GET',
          'name': 'babyplayer/albums',
          'desc': '获取专辑列表',
          'group': '!BabyPlayer',
          'url': 'https://xxx/api/v1/babyplayer/albums',
          'header': [common.JwtHeader()],
          'response': [
            new common.RspHead(),
            ['album_list', [new common.Album()], '专辑列表'],
          ]
        },
        {
          'method': 'POST',
          'name': 'babyplayer/albums',
          'desc': '创建专辑',
          'group': '!BabyPlayer',
          'url': 'https://xxx/api/v1/babyplayer/albums',
          'is_json_params': true,
          'header': [common.JwtHeader()],
          'params': [
            ['name', '', '名字'],
          ],
          'response': [
            new common.RspHead(),
          ]
        },    
        {
          'method': 'GET',
          'name': 'babyplayer/videos',
          'desc': '专辑视频列表',
          'group': '!BabyPlayer',
          'url': 'https://xxx/api/v1/babyplayer/videos',
          'header': [common.JwtHeader()],
          'params': [
            ['path', '', '路径'],
            ['bookmarks', [common.Bookmark()], '书签列表'],
          ],
          'response': [
            new common.RspHead(),
          ]
        },
        {
          'method': 'PUT',
          'name': 'babyplayer/videos/:id',
          'desc': '更新视频信息',
          'group': '!BabyPlayer',
          'url': 'https://xxx/api/v1/babyplayer/vidoes/:id',
          'is_json_params': true,
          'header': [common.JwtHeader()],
          'params': [
            ['path', '', '路径'],
          ],
          'response': [
            new common.RspHead(),
            new common.Bookmark(),
          ]
        },
        {
          'method': 'POST',
          'name': 'babyplayer/bookmark/upload',
          'desc': '上传书签',
          'group': '!BabyPlayer',
          'url': 'https://xxx/api/v1/babyplayer/bookmarks/upload',
          'header': [common.JwtHeader()],
          'params': [
            ['path', '', '路径'],
          ],
          'response': [
            new common.RspHead(),
            new common.Bookmark(),
          ]
        },
      ]
    }

}
